<script setup lang="ts">
const emit = defineEmits(["submit"]);
defineProps<{ noSubmitBtn?: boolean; noResetBtn?: boolean }>();
</script>

<template>
  <form
    autocomplete="off"
    @submit.prevent="emit('submit')"
    class="flex flex-col gap-y-2"
  >
    <slot></slot>
    <slot name="buttons"
      ><div class="flex items-center justify-start gap-x-2">
        <div v-if="!noSubmitBtn">
          <Button color="primary" type="submit">提交</Button>
        </div>
        <div v-if="!noResetBtn"><Button type="reset">重置</Button></div>
      </div></slot
    >
  </form>
</template>
